Skip to content

Conversation

@r1sim
Copy link

@r1sim r1sim commented Sep 13, 2025

Playing a song from the song list currently queues the entire library. My library contains ~3.5k tracks which caused me some performance issues. The queuing process caused the app to freeze for several seconds, and afterward, it took roughly 15 seconds to restart while using up to 1.2gb of memory.

I fixed this by using a batch api in addToQueue and replacing the playback queue VStack with a LazyVStack. After optimization, memory usage dropped to ~40mb and launch time decreased to under a second on my iPhone 12 running iOS26.

This significantly reduces the memory usage
The batch api is a lot faster when inserting many of items
@r1sim r1sim changed the title Performance improvements for large queues Performance improvements for large playback queues Sep 13, 2025
@faultables
Copy link
Member

Recently i got a crash report that may be related to this and already tracked here #55. I’ll look into it, thanks!

@faultables
Copy link
Member

added your commit into #87, will check on testflight/app store version soon. thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants